package com.hdjk.view.entity;

import android.text.TextUtils;

import com.lst.projectlib.entity.BaseEntity;

import java.util.List;

/**
 * Created by sxy on 2017/11/10.
 */

public class BuyPlanExecuteHistoryEntity extends BaseEntity {
    private String merchantNumber;
    private String allTransactionAmount;
    private List<Products> products;
    public void setMerchantNumber(String merchantNumber) {
        this.merchantNumber = merchantNumber;
    }
    public String getMerchantNumber() {
        return merchantNumber;
    }

    public void setAllTransactionAmount(String allTransactionAmount) {
        this.allTransactionAmount = allTransactionAmount;
    }
    public String getAllTransactionAmount() {
        return allTransactionAmount;
    }

    public void setProducts(List<Products> products) {
        this.products = products;
    }
    public List<Products> getProducts() {
        return products;
    }

    public class Products {

        private String contractNumber;
        private String fundCode;
        private String fundName;
        private String orderDate;
        private String transactionDate;
        private String transactionStatus;
        private String transactionAmount;
        public void setContractNumber(String contractNumber) {
            this.contractNumber = contractNumber;
        }
        public String getContractNumber() {
            return contractNumber;
        }

        public void setFundCode(String fundCode) {
            this.fundCode = fundCode;
        }
        public String getFundCode() {
            return fundCode;
        }

        public void setFundName(String fundName) {
            this.fundName = fundName;
        }
        public String getFundName() {
            return fundName;
        }

        public void setOrderDate(String orderDate) {
            this.orderDate = orderDate;
        }
        public String getOrderDate() {
            return orderDate;
        }

        public void setTransactionDate(String transactionDate) {
            this.transactionDate = transactionDate;
        }
        public String getTransactionDate() {
            return transactionDate;
        }

        public void setTransactionStatus(String transactionStatus) {
            this.transactionStatus = transactionStatus;
        }
        public String getTransactionStatus() {
            return transactionStatus;
        }
        public String getTransactionStatusName() {
            String name = "";
            if (!TextUtils.isEmpty(transactionStatus))
                switch (transactionStatus) {
                    case "failure":
                        name = "支付失败";
                        break;
                    case "received":
                        name = "下单成功";
                        break;
                    case "priced":
                        name = "确认成功";
                        break;
                    case "completed":
                        name = "交易成功";
                        break;
                    case "ipo.processing":
                        name = "认购确认成功";
                        break;
                    case "pending.payment":
                        name = "等待付款";
                        break;
                    case "canceling":
                        name = "撤单中";
                        break;
                    case "canceled":
                        name = "已撤单";
                        break;
                    case "pending.void":
                        name = "等待退款";
                        break;
                    case "void":
                        name = "交易失败";
                        break;
//            case "payment":
//                name="支付过程中的过渡状态，前台请过滤这个状态";
//                break;
                }
            return name;
        }
        public void setTransactionAmount(String transactionAmount) {
            this.transactionAmount = transactionAmount;
        }
        public String getTransactionAmount() {
            return transactionAmount;
        }

    }
}
